Extensions: A Technique for Structuring Functional-Logic Programs
نویسندگان
چکیده
Monads are a technique widely used in functional programming languages to address many different problems. This paper presents extensions, a functional-logic programming technique that constitutes an alternative to monads in several situations. Extensions permit the definition of easily reusable functions in the same way as monads, but are based on simpler concepts taken from logic programming, and hence they lead to more appealing and natural definitions of types and functions. Moreover, extensions are compatible with interesting features typical of logic programming, like multiple modes of use, while monads are not.
منابع مشابه
From Functional Logic Programs to Purely Functional Programs Preserving Laziness
Functional logic languages extend the setting of functional programming by non-deterministic choices, free variables and narrowing. Most existing approaches to simulate logic features in functional languages do not preserve laziness, i.e., they can only model strict logic programming like in Prolog. Lazy functional logic programming however, has interesting properties supporting a more declarat...
متن کاملIn Ipps'93: International Parallel Processing Symposium Explicit Parallel Structuring for Rule-based Programming
This paper presents semantically-based explicit parallel structuring for rule-based programming systems. Explicit parallel structuring appears to be necessary since compile-time dependency analysis of sequential programs has not yielded large scale parallelism and run-time analysis for parallelism is restricted by the execution cost of the analysis. Simple language extensions specifying semanti...
متن کاملGeneralised Logic Program Transformation Schemas
Schema-based logic program transformation has proven to be an eeective technique for the optimisation of programs. This paper results from the research that began by investigating the suggestions in 11] to construct a more general database of transformation schemas for optimising logic programs at the declarative level. The proposed transformation schemas fully automate accumulator introduction...
متن کاملAutomatic Structuring of Programs
A method is described that allows the translation of a traditionally written (unstructured) program into a set of top-down structured, semantically founded, GoTo-free modules. The method reveals not nly the logic of a given program in a most natural way, but it also reduces code duplication to a minimum. It is further shown how the obtained structured program can be mapped back into a GOTO prog...
متن کاملEquality propositional logic and its extensions
We introduce a new formal logic, called equality propositional logic. It has two basic connectives, $boldsymbol{wedge}$ (conjunction) and $equiv$ (equivalence). Moreover, the $Rightarrow$ (implication) connective can be derived as $ARightarrow B:=(Aboldsymbol{wedge}B)equiv A$. We formulate the equality propositional logic and demonstrate that the resulting logic has reasonable properties such a...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1999